<template>
  <el-dialog
    title="提示"
    :visible.sync="centerDialogVisible"
    :show-close="false"
    :close-on-press-escape="false"
    :close-on-click-modal="false"
    width="30%"
    center
  >
    <div class="contentModel">
      <span>该SN码在此工位已锁定！</span>
    </div>
    <div style="text-align: center; margin-top: 26px">
      <!-- del begin by zyj 2024/11/06 异常流程未结束时不能手动解锁-->
      <!-- <el-button type="primary" @click="onUnlock" style="margin-right:30px;">解锁</el-button> -->
      <!-- del end by zyj 2024/11/06 异常流程未结束时不能手动解锁-->
      <el-button @click="onBack" v-show="showClose">返回</el-button>
      <el-button @click="onBack2" v-show="showClose2">返回</el-button>
    </div>
  </el-dialog>
</template>
<script>
export default {
  name: "maskLayer",
  data() {
    return {
      warningType: undefined, // 是否警告
    };
  },
  props: {
    centerDialogVisible: Boolean,
    onUnlock: Function,
    clearStepsItemData: Function,
    showClose: {
      type: Boolean,
      default: false,
    },
    showClose2: {
      type: Boolean,
      default: false,
    }
  },
  methods: {
    onBack(){
      this.clearStepsItemData()
    },
    onBack2(){
      this.$router.push({
        path: '/appPro/preWorkPreparation'
      })
    }
  },
};
</script>
<style scoped>
.contentModel {
  color: red;
  font-size: 20px;
  text-align: center;
}

/deep/ .el-dialog {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0px !important;
}
</style>